package com.bhms.module.users.users.action;

import java.util.ArrayList;
import java.util.List;

import com.bhms.module.users.users.mapper.Roles;
import com.bhms.module.users.users.service.RoleService;
import com.sunshulin.common.action.GeneralAction;

/**
 * 系统角色管理action
 * 
 * @author 孙树林
 * 
 */
public class RoleAction extends GeneralAction {

	private static final long serialVersionUID = -5863047103742395447L;

	private RoleService roleService;

	private Roles roles = new Roles();

	private List<Roles> roleList = new ArrayList<Roles>();

	/**
	 * 查询，显示系统角色列表
	 * 
	 * @return
	 */
	public String roleList() {
		page(roles);
		roleList = roleService.searchRole(roles);
		return SUCCESS;
	}
	
	/**
	 * 根据ID，查找role信息
	 * @return
	 */
	public String findRole() {
		
		return SUCCESS;
	}

	public Roles getRoles() {
		return roles;
	}

	public void setRoles(Roles roles) {
		this.roles = roles;
	}

	public List<Roles> getRoleList() {
		return roleList;
	}

	public void setRoleList(List<Roles> roleList) {
		this.roleList = roleList;
	}

	public void setRoleService(RoleService roleService) {
		this.roleService = roleService;
	}
}
